package com.chengh.vhr.mapper;

import com.chengh.vhr.model.Department;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DepartmentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Department record);

    int insertSelective(Department record);

    Department selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);

    List<Department> getAllDepartments();

    int save(Department department);

    int deleteDeprmentByIds(@Param("ids") List<Integer> ids);

    List<Integer> getParentId(@Param("ids") List<Integer> ids);

    List<Integer> getIdsByParentIds(@Param("ids") List<Integer> ids);

    int updateIsParentByIds(@Param("ids") List<Integer> ids);

    List<Department> getDepartments();
}